<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户信息列表</title>
</head>
<body>
	<h1 align="center">用户信息列表 -- 非分页</h1>
	
	<table border="1" align="center" width="80%">
		<tr>
			<th>编号</th>
			<th>帐号</th>
			<th>姓名</th>
			<th>性别</th>
			<th>电话</th>
			<th>邮箱</th>
			<th>注册时间</th>
			<th>操作</th>	
		</tr>
		
		
		<c:choose>
			<c:when test="${empty requestScope.list }">
				<tr align="center">
					<td colspan="8">数据为空</td>
				</tr>
			</c:when>
			
			<c:otherwise>
				<c:forEach items="${requestScope.list }" var="user">
					<tr align="center">
						<td>${user.id }</td>
						<td>${user.username }</td>
						<td>${user.name }</td>
						<td>${user.sex }</td>
						<td>${user.phone }</td>
						<td>${user.email }</td>
						<td>
							<fmt:formatDate value="${user.regTime }" pattern="yyyy-MM-dd hh:mm"/>
						</td>
						<td>删除 | 查看</td>	
					</tr>
				</c:forEach>
			</c:otherwise>
			
		</c:choose>
		
	</table>
	
	
	<h1 align="center">
		<a href="${pageContext.request.contextPath }/admin/index.jsp">
			返回
		</a>
	</h1>
	
	
	
	
	
	
</body>
</html>